while True:
    passwd = input('Please input your password( 4-6 characters of alpha or digit): ')
    le = len(passwd)
    if not(4 <= le <= 6):
        print('It should be 4-6 characters. Your input is ', le, ' characters.')
    else:
        if not(passwd.isalnum()):
            print('Only alpha and digit is supported.')
        else:
            print('OK')
            break
